const handleInputTplCode = require('./input_tpl_code');
const handleAddMethods = require('./add_methods');
const handleInputDataCode = require('./add_data');

module.exports = function add_page (module_config, add_page) {
  var {
    totalTplCode,
    inputDataContent
  } = handleInputTplCode (module_config, add_page);
  
  var {
    methodsCodeFirst,
    methodsCodeSecond,
    mountedCode
  } = handleAddMethods (module_config, add_page);

  var {
    dataCodeStr
  } = handleInputDataCode (module_config, add_page);

  return {
    totalTplCode,
    inputDataContent,
    methodsCodeFirst,
    methodsCodeSecond,
    mountedCode,
  }
}